<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" />
<meta name="format-detection" content="telephone=no" />
<title>激活页面</title>
<meta content="" name="keywords" />
<meta content="" name="description" />
<meta content="" name="copyright" />
<meta content="" name="author" />
<meta name="robots" content="noarchive">
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" href="css/public.css" />
<link rel="stylesheet" href="css/style.css">
</head>

<body>
    <!--头部-->
    <div class="return_top bgyellow">
        <a href="union.html">
            <span class="login_home cfff">返回</span>
        </a>
    </div>
    <!--//头部结束-->
<!--主体区域-->
<div class="bgfff cb7 pl20 pr20">
    <form action="" method="post" onsubmit="return mydata_check(this)">
        <div class="mydata_inf bb mt20">
            <img src="temp/datacenter.png" class="mydata_inf_img mr20">
            <input placeholder="姓名" value="" keyboardtype="web-search" type="search" class="mydata_inf_input mr20">
        </div>
        <div class="mydata_inf bb" id="mydata_phone">
            <img src="temp/datacall.png" class="mydata_inf_img mr20">
            <input placeholder="电话" value="" keyboardtype="web-search" type="search" class="mydata_inf_input mr20" id="phone">
        </div>
        <p class="cred tc pt10 hide tishi">请输入手机号</p>
        <p class="cred tc pt10 hide tishitext">手机或电话号码格式不正确。</p>
        <div class="mydata_inf bb">
            <img src="temp/datags.png" class="mydata_inf_img mr20">
            <input placeholder="车牌号" value="" keyboardtype="web-search" type="search" class="mydata_inf_input mr20">
        </div> 

        <div class="bgfff c333 pt20">
            <p class="fz32 pb20 cblue">激活类型</p>
            <div class="clear divImgIn"> 
                <div class="fl mr40 deactivation_unchecked deactivation_select" data-id="deactivation_pay">付费</div>
                <div class="fl deactivation_unchecked" data-id="deactivation_code">激活码</div>
            </div>
        </div>
        <div id="deactivation_pay" class="deactivation_cont lh90">付费：<span class="cblue">48.8元</span></div>                
        <div id="deactivation_code" class="deactivation_inf bb deactivation_cont hide">
            <img src="temp/payphone.png" class="deactivation_inf_img mr20">
            <input placeholder="输入激活码" value="" keyboardtype="web-search" type="search" class="deactivation_inf_input mr20">
        </div>

        <div class="car_cont">
            <button class="w100 car_cont_submit fz32 cfff">立即激活</button>
        </div>
    </form> 
</div>

  <!--底部-->
  <div class="footerpage"></div>
  <!--//底部-->
</body>

<script>
$(".footerpage").load("footer.html",'',function() {
    $('#myCenter').addClass("select-two").children().attr("class","myCenterclick");
});
    function mydata_check(){ 
        var phone = document.getElementById('phone');
        if(phone.value==''){
            // alert('电话不能为空');
            $(".tishi").removeClass('hide');
            $(".tishitext").addClass('hide');
            $("#mydata_phone").removeClass('bb').addClass('bbred');
            return false;
            phone.focus();
            return false;
        }else{
            var phone_reg = /^13[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}|17[0-9]{1}[0-9]{8}$|14[0-9]{1}[0-9]{8}/;
            var tel_reg = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
            if(!phone_reg.test(phone.value) && !tel_reg.test(phone.value)){
                $(".tishi").addClass('hide');
                $(".tishitext").removeClass('hide');
                phone.focus();
                return false;
            }
        }
    }

    $(function(){
			$(".divImgIn div").click(function() {
				$(this).siblings().removeClass('deactivation_select');// 删除其他兄弟元素的样式
                $(this).addClass('deactivation_select');// 添加当前元素的样式
                var id=$(this).attr("data-id");
                $(".deactivation_cont").addClass('hide');
                $("#"+id).removeClass('hide');
			});
        });
</script>

</html>